package dao;

import util.DBHelper;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class CWeekArrangeIDMemoryDAO {
	
	
	public int increaseCWeekArrangeID(Statement statement) throws SQLException {
		ResultSet rs;
		int nCWeekArrangeID = 0;
		rs = statement.executeQuery("select * from cweekarrangeidmemory");
		rs.next();
		nCWeekArrangeID = rs.getInt(1);
	
		statement.execute("update cweekarrangeidmemory set CWeekArrangeID=CWeekArrangeID+1");
		
		rs.close();
		
		return nCWeekArrangeID;
	}
}
